﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MenuMaster.Master" AutoEventWireup="true" CodeBehind="EditPages.aspx.cs" Inherits="Department.admin.SiteStructure.EditPages" %>
<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="ContentMain" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="page-heading">
        <h1>Редакция на страница</h1>
    </div>
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="../images/shared/side_shadowleft.jpg" width="20" height="300" alt="" />
            </th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;
            </td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="../images/shared/side_shadowright.jpg" width="20" height="300" alt="" />
            </th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner -->
                <div id="content-table-inner">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr valign="top">
                            <td>
                                <!--  start step-holder -->
                                <!--  end step-holder -->
                                <!-- start id-form -->
                                <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                                    <tr>
                                        <th valign="top">
                                            Заглавие:
                                        </th>
                                        <td class="style2">
                                            <asp:TextBox ID="headingTextBox" runat="server" CssClass="inp-form" 
                                                Width="189px" />
                                            <asp:RegularExpressionValidator ID="regExValidator"
                                                ControlToValidate="headingTextBox"
                                                ValidationExpression="[a-zA-Zа-яА-Я0-9._\s]+"
                                                ErrorMessage="Използвате непозволени символи!"
                                                runat="server" />
                                            <asp:RequiredFieldValidator ID="rqFieldValidator"
                                                ControlToValidate="headingTextBox"
                                                ErrorMessage="Полето е задължително!"
                                                runat="server" />
                                        </td>
                                        
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Динамично съдържание:
                                        </th>
                                        <td class="style2">
                                            <asp:DropDownList ID="DropDownListDynamicContent" runat="server" 
                                                DataSourceID="SqlDataSourceDynamicContent" DataTextField="Name" 
                                                DataValueField="ID" AppendDataBoundItems="True">
                                                <asp:ListItem>--</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:SqlDataSource ID="SqlDataSourceDynamicContent" runat="server" 
                                                ConnectionString="<%$ ConnectionStrings:DepartmentConnectionString %>" 
                                                SelectCommand="SELECT [ID], [Name] FROM [Type]"></asp:SqlDataSource>
                                        </td>
                                        
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            В меню:
                                        </th>
                                        <td class="style2">
                                            <asp:DropDownList ID="DropDownListMenu" runat="server" 
                                                DataSourceID="SqlDataSource1" DataTextField="Name" 
                                                DataValueField="ID" AppendDataBoundItems="True">
                                                <asp:ListItem>--</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                                ConnectionString="<%$ ConnectionStrings:DepartmentConnectionString %>" 
                                                
                                                SelectCommand="SELECT ID, Name, FacDeptID FROM Menu WHERE (FacDeptID = dbo.uf_get_department_id())"></asp:SqlDataSource>
                                        </td>
                                        
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Главна:
                                        </th>
                                        <td class="style2">
                                            <asp:CheckBox ID="checkboxActive" runat="server" />
                                           
                                        </td>
                                     
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Роли за страницата:
                                        </th>
                                        <td>
                                            <asp:GridView HorizontalAlign="Center" ID="rolesGridView" runat="server" AutoGenerateColumns="False"
                                                DataSourceID="RolesDataSource" Height="155px" Width="200px" RowStyle-HorizontalAlign="Center"
                                                HeaderStyle-HorizontalAlign="Center">
                                                <Columns>
                                                    <asp:BoundField DataField="RoleName" HeaderText="Роля" HeaderStyle-HorizontalAlign="Center"
                                                        SortExpression="RoleName">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="RoleId" HeaderText="RoleId" HeaderStyle-HorizontalAlign="Center"
                                                        SortExpression="RoleId" >                                                    
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="Има право" HeaderStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkSelect" runat="server" RowStyle-HorizontalAlign="Center"/>
                                                        </ItemTemplate>
                                                        <FooterStyle HorizontalAlign="Center" />
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                                <RowStyle HorizontalAlign="Center"></RowStyle>
                                            </asp:GridView>
                                            <asp:SqlDataSource ID="RolesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:DepartmentConnectionString %>"
                                                SelectCommand="SELECT DISTINCT RoleName, RoleId FROM v_PageRights"></asp:SqlDataSource>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Текст:
                                        </th>
                                        <td class="style2">
                                            <CKEditor:CKEditorControl ID="CKEditor" runat="server" Height="203px" Width="578px">
		
                                            </CKEditor:CKEditorControl>
                                        </td>
                                        <td class="style1">
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            &nbsp;
                                        </th>
                                        <td valign="top" class="style2">

                                            <asp:Label ID="ErrorLabel" runat="server" Text="Label" ForeColor="#CC3300" 
                                                Visible="False"></asp:Label>
                                                <br />
                                            <asp:Button ID="buttonSubmit" runat="server" Text="Button" 
                                                CssClass="form-submit" OnClick="buttonSubmit_Click" />
                                        </td>
                                        <td class="style1">
                                        </td>
                                    </tr>
                                </table>
                                <!-- end id-form  -->
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <img src="../images/shared/blank.gif" width="695" height="1" alt="blank" />
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;
            </td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
</asp:Content>
